1. Field of the Invention
The invention relates to a method for filtering pixels in rasterized image data, comprising a combination of text and photographic content, each pixel having a discrete color value. The invention further relates to a method for image compression, a computer program product for executing the invented method and an electronic device, configured to execute the method.
2. Description of the Related Art
Many contemporary print systems employ rasterized image data to print an image in a print process wherein colorants are applied in the form of e.g. toner or ink, on a flat medium, such as paper. These rasterized image data comprise pixels, each pixel having a discrete color value that indicates a color of the image on the position of the pixel. These pixels are often generated by a raster image processor (RIP) that converts image data as specified in the form of objects in a page description language (PDL), such as PDF, PostScript or HP-GL, into rasterized image data using conventional processes like interpretation and rendering. A color management module is involved in the rendering process to convert an input color to an output color in a color space that is specific for the printer that is to produce the printed output. The quality of the rasterized image data depends among others on the resolution, which is the number of pixels per unit length, such as the number of pixels per inch (ppi). Photographic objects and other rasterized objects in a PDL are already rasterized and therefore only need resampling to obtain pixels at the required resolution. In contrast, objects described by the use of vector graphics and geometrical primitives, including characters defined in outline fonts, are rasterized directly in the required resolution. Color values of pixels comprise at least three components for full color images, but may also refer to intensity values, or grey values, in a monochrome image.
In its rasterized form, an image may comprise so much data that data compression is used to reduce the data set for storage and transfer. However, in order to retain the image quality, a lossless image compression technique is applied, which often involves runlength coding for recurring pixel values. E.g. in US patent application 2009/0129691, a lossless image compression technique is described, wherein, in addition to familiar two dimensional runlength coding, dedicated codes are used to encode small differences between neighboring pixels. Still, the compression arrived at by this coding may be insufficient for a sufficiently high data transfer rate in the case of high speed printing. It may also be insufficient for storing a sufficient number of print jobs in an available memory, volatile or non-volatile. Putting it differently, given a predetermined memory size, a larger number of print jobs may be stored in the available memory, if more compression can be achieved. After decoding the losslessly compressed data, the original rasterized image data are obtained.
As indicated above, the rasterized image data comprises text as well as photographic content. These content types show different behaviour under lossless compression. Text is used in this context for content type stemming from all kind of vector graphics, such as lines and other graphical primitives. Text and business graphics compress very well, because the pixel values of these content types show predictable behaviour, whereas photographic content and other rasterized image content can not be compressed as effectively, because each pixel value may differ from its predecessors. For this reason, the part of the image data relating to photographic content may be filtered in a way to improve the compression factor, which is the ratio of the amount of image data before the compression and the amount of image data after the compression. This is disclosed in U.S. Pat. No. 6,373,583, wherein the image data with photographic content are filtered prior to the rasterization of a page with mixed content. However, the kind of filter as used in said patent, is only applicable to photographic content, as the image quality of text content would undergo serious deterioration due to the filtering, leading to unacceptable loss of visual quality of a print. In addition, the application of the filter might lead to a lower compression factor for the text content.
In an image data processing path for preparing image data for a print engine, the rasterization is applied to full pages of a document. In order to apply a filter to photographic content only, the related objects must be marked or retrieved by recognition or segmenting techniques. This would lead to rather complicated processing steps, that would hinder the increase in processing speed that is needed for high speed print engines. Therefore, a problem exists to filter rasterized image data that comprises both text and photographic content.
An object of the present invention is to find a simple method, which is applicable in high speed print engines, for filtering rasterized image data that comprises both text and photographic content in such a way that the lossless compression factor is raised without affecting the image quality.